$(function() {
	createEmpty('pointInspection', '报警率', 0, 100);
	createEmpty('workTicket', '完成率', 0, 100);
	createEmpty('operation', '完成率', 0, 100);
	createEmpty('regular', '完成率', 0, 100);

	function createEmpty(id, dataName, data1, data2) {
		var mychar = echarts.init(document.getElementById(id));
		mychar.setOption({
			tooltip: {
				show: false,
				trigger: 'item',
				formatter: "{a} <br/>{b} : {c} ({d}%)"
			},
			series: [{
				name: '',
				type: 'pie',
				radius: ['60%', '70%'],
				label: {
					normal: {
						position: 'center'
					}
				},
				hoverAnimation: false,
				data: [{
					value: data1,
					name: dataName,
					label: {
						normal: {
							formatter: '{d} %',
							textStyle: {
								fontSize: 16,
								color: '#fff',
							}
						}
					},

				}, {
					value: data2,
					name: '占位',
					label: {
						normal: {
							formatter: '\n报警率',
							textStyle: {
								color: '#fff',
								fontSize: 12
							}
						}
					},
					itemStyle: {
						normal: {
							color: '#a8dccf',
						},
						emphasis: {
							color: '#a8dccf',
						},
					},
					tooltip: {
						show: false
					},
					hoverAnimation: false
				}]
			}],
			color: ["#fff", '#a8dccf']
		})
	}
})